type Rect = {
    x:number,
    y:number,
    width:number,
    height:number
}
function drawFrame(ctx:CanvasRenderingContext2D, rect:Rect){
    const {x,y,width,height} = rect;
    ctx.beginPath();
    ctx.moveTo(x, y);
    ctx.lineTo(x+width,y);
    ctx.lineTo(x+width,y+height);
    ctx.lineTo(x,y+height);
    ctx.lineTo(x,y);
    ctx.closePath();
    ctx.lineWidth = 4;
    ctx.strokeStyle = "#ff0000"
    ctx.fillStyle = "#909090"
    ctx.stroke();
    ctx.fill();

}